package com.xinchuang.controller;

import com.alibaba.fastjson.JSONObject;
import com.xinchuang.common.Result;
import com.xinchuang.service.targetSystem.DjNalysisService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(value = "打击分析controller", tags = {"打击分析维护接口"})
@RequestMapping("/djNalysis")
@RestController
public class DjNalysisController {

    @Resource
    private DjNalysisService djNalysisService;

    @ApiOperation("获取子目标打击列表")
    @PostMapping("/getSubtargetList")
    public Result getSubTargetHitList(@RequestBody JSONObject jsonObject) {
        return djNalysisService.getSubTargetHitList(jsonObject);
    }

    @ApiOperation("获取子目标类型")
    @PostMapping("/getSubtargetTypeList")
    public Result getSubTargetTypeList(@RequestBody JSONObject jsonObject) {
        return djNalysisService.getSubTargetTypeList(jsonObject);
    }

    @ApiOperation("计算DJ分析结果")
    @PostMapping("/getDJResult")
    public Result getDJResult(@RequestBody JSONObject jsonObject) {
        return djNalysisService.getDJResult(jsonObject);
    }

    @ApiOperation("获取MB的子MB列表接口")
    @PostMapping("/getSubTargetListByTargetId")
    public Result getSubTargetListByTargetId(@RequestBody JSONObject jsonObject) {
        return djNalysisService.getSubTargetListByTargetId(jsonObject);
    }
}
